$(function () {
    headerForm()
    headerNav()
})

function headerForm() {
    $(window).click(function (e) {
        var target = e.target
        if (!$(target).is('.form')) {
            $('#headerform').removeClass('formfocuse')
        }
        else {
            $('#headerform').addClass('formfocuse')
        }

    })
    $(window).scroll(function () {
        $('#headerform').removeClass('formfocuse')
    })
}

function headerNav() {
    var headernav = $('#headernav')
    var firstnav = headernav.find('.firstnav')
    firstnav.hover(function () {
        $(this).find('.secondnav').slideDown(200)
    }, function () {
        $(this).find('.secondnav').slideUp(200)
    })

}

function createXmlHttpRequest() {
    if (window.ActiveXObject) { //如果是IE
        return new ActiveXObject("Microsoft.XMLHTTP");
    } else if (window.XMLHttpRequest) { //非IE浏览器
        return new XMLHttpRequest();
    }
}


/**
 * 显示未认证的公共函数
 * @author hey_heyang(635870453@qq.com)
 */
function head_auth_block_show() {
    $('#head_auth_block').show();
}